package com.a16.yuejian.yuejian.service;

import com.a16.yuejian.yuejian.javabean.Exist;
import com.a16.yuejian.yuejian.javabean.Img;
import com.a16.yuejian.yuejian.javabean.Login;
import com.a16.yuejian.yuejian.javabean.Success;
import com.a16.yuejian.yuejian.javabean.User;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by 55080 on 2017/9/25.
 */

public interface UserService {
    @GET("index.php/api/index/login")
    Call<Login> login(
            @Query("username")String username,
            @Query("pwd")String pwd
    );

    @Multipart
    @POST("index.php/api/index/reg")
    Call<Success> reg(
            @Query("phone")String phone,
            @Query("username")String username,
            @Query("pwd")String pwd,
            @Part MultipartBody.Part file
    );

    @GET("index.php/api/index/exist")
    Call<Exist> exist(
            @Query("phone")String phone
    );

    @GET("index.php/api/index/userinfo")
    Call<User> userinfo(
            @Query("uid")String uid
    );
}
